package com.rainy.guoran.business.manager.config;

import com.baomidou.mybatisplus.autoconfigure.MybatisPlusAutoConfiguration;
import com.baomidou.mybatisplus.autoconfigure.MybatisPlusProperties;
import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
import com.rainy.guoran.business.manager.handler.TablePublicFieldHandler;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;

@AutoConfiguration(before = MybatisPlusAutoConfiguration.class)
@EnableConfigurationProperties({MybatisPlusProperties.class})
public class GuoranMybatisConfig {

    @Bean
    public MetaObjectHandler defaultMetaObjectHandler() {
        return new TablePublicFieldHandler(); // 自动填充参数类
    }

}
